package com.huluobo.a2203kotlinshopping.viewBindingDemo

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import com.huluobo.a2203kotlinshopping.R
import com.huluobo.a2203kotlinshopping.databinding.ActivityUserBinding

/**
 *
 */
class UserActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val binding = ActivityUserBinding.inflate(layoutInflater)
        setContentView(binding.root)

        val user = DataBindingUserJava()
        binding.user = user
//        binding.userBtn.setOnClickListener {
//            val user = User(
//                binding.userUsername.text.toString(),
//                binding.userPassword.text.toString()
//            )
//
////            binding.usernameTv.text = user.username
////            binding.passwordTv.text = user.password
//            binding.user = user
//        }
    }
}